/*
 * Copyright (C) 2000-2008 Jens Nixdorf and various contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies of the Software, its documentation and marketing & publicity
 * materials, and acknowledgment shall be given in the documentation, materials
 * and software packages that this Software was used.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package org.mopore.jat.gui;

import java.awt.Color;
import java.awt.image.BufferedImage;

import javax.swing.ImageIcon;

import org.mopore.jat.util.ImageService;

public enum Theme {
	
	OCEAN( "ocean", "/images/trayicons/ocean.gif", 
			new Color( 3,110,146 ), new Color( 0,2,10 ) ),
	
	COPPPER( "copper","/images/trayicons/copper.gif", 
			new Color( 212,150,37 ), new Color( 106,11,0 ) ),
	
	MAHAGONI( "mahagoni","/images/trayicons/mahagoni.gif", 
			new Color( 214,136,136 ), new Color( 112,14,14 ) ),
	
	NATURE( "nature","/images/trayicons/nature.gif", 
			new Color( 16,150,94 ), new Color( 0,11,3 ) ),
	
	SILVER( "silver","/images/trayicons/silver.gif", 
			new Color( 148,148,148 ), new Color( 20,20,20 ) ),
	
	SUNSET( "sunset","/images/trayicons/sunset.gif", 
			new Color( 255,253,5 ), new Color( 176,43,0 ) );
	
	private Color top;
	
	private Color bottom;
	
	private String path;
	
	private String text;
	
	private ImageIcon icon;
	
	Theme( String text, String path, Color colorTop, Color colorBottom ) {
		this.text = text;
		this.path = path;
		this.top = colorTop;
		this.bottom = colorBottom;
	}
	
	public String getPath() {
		return path;
	}
	
	public Color getColorTop(){
		return top;
	}
	
	public String getText() {
		return text;
	}
	
	public Color getColorBottom(){
		return bottom;
	}
	
	public ImageIcon getIcon(){

		if ( this.icon == null ){
			BufferedImage image = ImageService.load( path );
			icon = new ImageIcon( image );
		}
		return icon;
	}
}
